package com.sy.mapper;

import com.sy.entity.StudyFile;
import com.sy.vo.StudyFileVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Repository;

@Repository
public interface StudyFileMapper {
    /**
     * 添加文件信息
     * @param uploadFileVo
     * @return
     */
    int insertFile(StudyFileVo uploadFileVo);

    /**
     * 查找文件信息
     * @param id
     * @return
     */
    StudyFile getStudyFile(Integer id);

    boolean insertFileUrl(@Param(value="fileUrl") String fileUrl, @Param(value="fileId") Integer fileId);
    /**
     * Author:张德帅
     * 根据老师id删除文件信息
     * @param teacherId 老师id
     * @return
     */
    boolean delStudyFileByTeacherId(Integer teacherId);


    /**
     * 删除文件
     * @param fileId
     * @return
     */
    boolean deleteStudyFile(String fileId);
}
